package com.jing.domain.dto;

import com.jing.domain.po.MemberPrice;
import com.jing.domain.po.ProductFullReduction;
import com.jing.domain.po.ProductIcon;
import com.jing.domain.po.ProductLadder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import lombok.NonNull;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author：sheyudie
 * @Package：com.bwie.goods.pojo
 * @Project：Jing-Cloud
 * @name：Goods
 * @Date：2024/5/22 20:44
 */
@ApiModel(description = "")
@Data
public class GoodsInfoDTO {
    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id", required = false)
    private Long id;

    /**
     * 商品分类ID
     */
    @NotNull(message = "商品分类id不能为空")
    @ApiModelProperty(value = "商品分类ID", required = true)
    private Long typeId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称", required = true)
    private String name;

    /**
     * 副标题
     */
    @NotBlank(message = "副标题不能为空")
    @ApiModelProperty(value = "副标题", required = true)
    private String subTitle;

    /**
     * 品牌id
     */
    @NotBlank(message = "品牌id不能为空")
    @ApiModelProperty(value = "品牌id", required = true)
    private Long brandId;

    /**
     * 商品描述
     */
    @ApiModelProperty(value = "商品描述", required = false)
    private String description;

    /**
     * 货号
     */
    @ApiModelProperty(value = "货号", required = false)
    private String productSn;

    /**
     * 价格
     */
    @ApiModelProperty(value = "价格", required = false)
    private BigDecimal price;

    /**
     * 市场价
     */
    @ApiModelProperty(value = "市场价", position = 9)
    private BigDecimal originalPrice;

    /**
     * 库存
     */
    @ApiModelProperty(value = "库存", required = false)
    private Integer stock;

    /**
     * 单位
     */
    @ApiModelProperty(value = "单位", required = false)
    private String unit;

    /**
     * 商品重量，默认为克
     */
    @ApiModelProperty(value = "商品重量，默认为克", required = false)
    private BigDecimal weight;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序", required = false)
    private Integer sort;

    /**
     * 赠送的积分
     */
    @ApiModelProperty(value = "赠送的积分", required = false)
    private Integer giftPoint;

    /**
     * 赠送的成长值
     */
    @ApiModelProperty(value = "赠送的成长值", required = false)
    private Integer giftGrowth;

    /**
     * 活动限购数量
     */
    @ApiModelProperty(value = "活动限购数量", required = false)
    private Integer promotionPerLimit;

    /**
     * 是否为预告商品：0->不是；1->是
     */
    @ApiModelProperty(value = "是否为预告商品：0->不是；1->是", required = false)
    private Integer previewStatus;

    /**
     * 上架状态：0->下架；1->上架
     */
    @ApiModelProperty(value = "上架状态：0->下架；1->上架", required = false)
    private Integer publishStatus;

    /**
     * 新品状态:0->不是新品；1->新品
     */
    @ApiModelProperty(value = "新品状态:0->不是新品；1->新品", required = false)
    private Integer newStatus;

    /**
     * 推荐状态；0->不推荐；1->推荐
     */
    @ApiModelProperty(value = "推荐状态；0->不推荐；1->推荐", required = false)
    private Integer recommandStatus;

    /**
     * 以逗号分割的产品服务：1->无忧退货；2->快速退款；3->免费包邮
     * TODO
     */
    @ApiModelProperty(value = "以逗号分割的产品服务：1->无忧退货；2->快速退款；3->免费包邮", required = false)
    private String serviceIds;

    /**
     * 详情标题
     */
    @ApiModelProperty(value = "详情标题", required = false)
    private String detailTitle;

    /**
     * 详情描述
     */
    @ApiModelProperty(value = "详情描述", required = false)
    private String detailDesc;

    /**
     * 关键字
     */
    @ApiModelProperty(value = "关键字", required = false)
    private String keywords;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", required = false)
    private String note;

    /**
     * 促销类型：0->没有促销使用原价;1->使用促销价；2->使用会员价；3->使用阶梯价格；4->使用满减价格；5->限时购
     * TODO
     */
    @ApiModelProperty(value = "促销类型：0->没有促销使用原价;1->使用促销价；2->使用会员价；3->使用阶梯价格；4->使用满减价格；5->限时购", required = false)
    @NotNull(message = "促销类型不可为空，可以默认")
    private Integer promotionType;

    /**
     * 特惠促销
     */
    @ApiModelProperty(value = "特惠促销", required = false)
    private ProductLadder goodsPromotionsDTO;

    /**
     * 会员价格
     * TODO
     */
    @ApiModelProperty(value = "会员价格", required = false)
    private List<MemberPrice> goodsMemberPriceDTOList;

    /**
     * 阶梯价格
     */
    @ApiModelProperty(value = "阶梯价格", required = false)
    private List<ProductLadder> goodsLadderDTOList;

    /**
     * 满减价格
     */
    @ApiModelProperty(value = "满减价格", required = false)
    private List<ProductFullReduction> goodsFullReductionDTOList;

    /**
     * 品牌属性分类ID
     */
    @ApiModelProperty(value = "品牌属性分类ID", required = false)
    private Long propertyTypeId;

    /**
     * 商品相册
     */
    @ApiModelProperty(value = "商品相册", required = false)
    private List<ProductIcon> goodsPhotoDTOList;

    /**
     * 产品详情网页内容
     */
    @ApiModelProperty(value = "产品详情网页内容", required = false)
    private String detailHtml;

    /**
     * 移动端网页详情
     */
    @ApiModelProperty(value = "移动端网页详情", required = false)
    private String detailMobileHtml;
    /**
     *
     */
    @ApiModelProperty(value = "sku")
    @NotEmpty(message = "不可为空")
    private List<Map<String, String>> sku;
}
